package org.devastra.arcinspect.analyzer.data;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class ProjectData {
	
	private String name;
	private String baseFolder;
	private List<File> projSrcFolders;
	private List<File> projLibraries;
	
	private static ProjectData instance;
	
	private ProjectData(String _name, String _baseFolder) {
		name = _name;
		baseFolder = _baseFolder;
		projSrcFolders = new ArrayList<File>();
		projLibraries = new ArrayList<File>();
	}
	
	public static synchronized ProjectData getInstance(String _name, String _baseFolder) {
		if(instance == null) {
			instance = new ProjectData(_name, _baseFolder);
		}
		
		return instance;
	}
	
	public void addSrcFolders(File _srcFolder) {
		projSrcFolders.add(_srcFolder);
	}
	
	public String getProjectName() {
		return name;
	}
	
	public String getBaseFolder() {
		return baseFolder;
	}
	
	public List<File> getSourceFolders() {
		return projSrcFolders;
	}
	
	public void addLibrary(File _jarFile) {
		projLibraries.add(_jarFile);
	}
	
	public List<File> getProjectLibraries() {
		return projLibraries;
	}
}
